#ifndef _DATABASE_H_
#define _DATABASE_H_

#include "Res.h"


int initDatabase();
int insert_sql(RGU *rgu,char* s);
int AddDish_sql(MENU *rgu, char *s);
int Delete_sql(MENU *rgu, char *s);
int Modify_sql(MENU *rgu, char *s);
int show_Sql(QUREY_RST *pQR, MENU *rgu, char *s);
int order_Sql(MENU *rgu, char *s,double* price);
int findClient_Sql(QUREY_RST *pQR, MENU *rgu, char *s);
int FindClientName_Sql(char *s, char *clientName,int orderID);
int InsertClientOrder_Sql(QUREY_RST *pQR, char *table_name02, char * dealingOrder);
int FindClientOrder_Sql(QUREY_RST *pQR, char *s, int orderID);
int findPending_Sql(QUREY_RST *pQR, char *s,char * shoreName);
int deletePending_Sql( char *s,int orderID);
int CurOrder_sql(MENU *rgu, char *s1,char *s2);
int showMerchant_Sql(QUREY_RST *pQR, char *s);
int querySql(QUREY_RST * pQR,RGU *pRgu,char* s);

int findClient_Sql02(QUREY_RST *pQR,  ORDER_INFOR *oRD, char *s);

int FindClientOrder_Sql02(QUREY_RST *pQR, char *s, char *clientName);
int FindClientOrder_Sql03(QUREY_RST *pQR, char *s, char *clientName);

int insertChatRecords_sql(SINGLE_CHAT *sc, char *s);

int FindSelfChats_Sql(QUREY_RST *pQR, char *table_name, char *selfName);
int DeleteSelfChats_Sql(char *s, char* selfName);

int UpdateClientOrder_Sql01(QUREY_RST *pQR, char *table_name, int orderID);
int UpdateClientOrder_Sql02(QUREY_RST *pQR, ORDER_INFOR* oRD,char *table_name, char *dealingOrder);


#endif